package com.example.service.Impl;

import com.example.mapper.UserMapper;
import com.example.pojo.User;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public int register(String username,String password) {

        userMapper.insertUser(username,password);
        return 1;
    }

    @Override
    public User login(String username,String password) {
        User user = userMapper.queryUser(username);
        return user;
    }
}
